package com.stylefeng.guns.modular.flagglory.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.common.persistence.model.Level;
import com.stylefeng.guns.common.persistence.model.UserStar;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.modular.flagglory.service.IDivisionService;
import com.stylefeng.guns.modular.flagglory.service.ILevelService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import com.stylefeng.guns.core.log.LogObjectHolder;
import org.springframework.web.bind.annotation.RequestParam;
import com.stylefeng.guns.common.persistence.model.GloryUser;
import com.stylefeng.guns.modular.flagglory.service.IGloryUserService;

/**
 * 用户控制器
 *
 * @author fengshuonan
 * @Date 2018-01-31 14:13:35
 */
@Controller
@RequestMapping("/gloryUser")
public class GloryUserController extends BaseController {

    private String PREFIX = "/flagGlory/gloryUser/";

    @Autowired
    private IGloryUserService gloryUserService;


    /**
     * 跳转到用户首页
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "gloryUser.html";
    }

    /**
     * 获取用户列表
     */
    @RequestMapping(value = "/list")
    @ResponseBody
    public Object list(String condition) {
        return gloryUserService.selectList(null);
    }

    /**
     * 用户详情
     */
    @RequestMapping(value = "/detail/{gloryUserId}")
    @ResponseBody
    public Object detail(@PathVariable("gloryUserId") Integer gloryUserId) {
        return gloryUserService.selectById(gloryUserId);
    }

    @RequestMapping(value = "/register")
    @ResponseBody
    public Object register(GloryUser user) {



        return null;
    }
}
